package com.shenfa.util.listener;

import javax.servlet.ServletContextEvent;

import org.apache.log4j.Logger;

/**
 * 账单系统监听器
 * @author David
 *
 */
public class ServletContextListener implements javax.servlet.ServletContextListener {

	private static Logger log = Logger.getLogger(ServletContextListener.class);
	
	public void contextDestroyed(ServletContextEvent arg0) {}

	public void contextInitialized(ServletContextEvent arg0) {
		log.info("init structure factory start.");
		try {
			net.gmc.util.port.structure.PackageStructureFactory.init();
			net.gmc.util.config.ConfigReader.init();
			net.gmc.util.config.NetReader.init();
		} catch (Exception e1) {
			log.fatal("init configs " + e1);
		}
		log.info("init structure factory finish.");
	}

}
